﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MS.Utility.Config
{
    public class CacheConfig
    {
        #region 缓存类型
        private static string _CacheType;

        public static string CacheType
        {
            get
            {
                if (_CacheType == null)
                {
                    _CacheType = ConfigurationManager.AppSettings["CacheType"].ToString();
                }
                return _CacheType;
            }
        }
        #endregion

        #region 缓存IP
        private static string _CacheIP;

        public static string CacheIP
        {
            get
            {
                if (_CacheIP == null)
                {
                    _CacheIP = ConfigurationManager.AppSettings["CacheIP"].ToString();
                }
                return _CacheIP;
            }
        }
        #endregion

        #region 缓存端口
        private static string _CachePort;

        public static string CachePort
        {
            get
            {
                if (_CachePort == null)
                {
                    _CachePort = ConfigurationManager.AppSettings["CachePort"].ToString();
                }
                return _CachePort;
            }
        }
        #endregion

        public const string LoginUserKey = "KEY:LOGINUSER:";
    }
}
